<?php

namespace App\Store\Validate\Goods;

use App\Common\Validate\BaseValidate;

/**
 * 验证器
 */
class GoodsTotalStockList extends BaseValidate
{
    //验证规则
    protected $rule = [];
    //自定义验证信息
    protected $message = [];

    public function __construct($doaction = 'add')
    {
        if ($doaction == 'edit') {
            $this->rule = [
                'id' => 'required',
                'return_supply_id' => 'required',
                'bank_card_number' => 'required',
                'paymoney' => 'required',
            ];
            $this->message = [
                'id.required' => 'id未选择',
                'return_supply_id.required' => '返厂供应商未选择',
                'bank_card_number.required' => '银行卡号未选择',
                'paymoney.required' => '应付账款未选择',
            ];
        }
    }
}
